home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Extra 1997 #1 / Amiga Plus Extra 1997 #1.iso / programme / grafik / video easel / camrexx / vartube-worms.rexx < prev    next >
OS/2 REXX Batch file  |  1995-03-30  |  905b  |  31 lines

  1. /* VARTube-Worms:    By an idea of Toffoli, converted to CAMRexx by THOR */
  2.  
  3. MakeAlgorithm:
  4.    PLANEALGORITHM moore centers
  5. return
  6.  
  7. /* parameters.alarm */
  8. MakePlane:
  9.    if plane=0 then; do
  10.       if alts=0   then  SETPLANE on       /* emerge if timer over */
  11.       else              SETPLANE off
  12.    end
  13.    if plane=1 then; do
  14.      sum8=north+south+west+east+n_west+n_east+s_west+s_east /* add up */
  15.      if sum8=parameters.alarm-1 | sum8>parameters.alarm then
  16.                      SETPLANE on          /* ring alarm */
  17.      else            SETPLANE off
  18.    end
  19.    if plane=2 | plane=3 then; do
  20.       if alt & alt_ then               SETPLANES 12         /* set timer */
  21.       else; do
  22.          newcenter=centers
  23.          if newcenter>0 then newcenter=newcenter-1          /* decrement */
  24.          newcenter=newcenter*4         /* set in planes 2..3 */
  25.          SETPLANES newcenter
  26.       end
  27.    end
  28. return
  29.  
  30.  
  31.